# Maintainer: Felix Yan <felixonmars@archlinux.org>

pkgname=python-tldextract
pkgver=3.4.1
_commit=a7ecf90c92c1f1c8f011637437224fc980610237
pkgrel=1
pkgdesc="Accurately separate the TLD from the registered domain and subdomains of a URL, using the Public Suffix List"
arch=('any')
url="https://github.com/john-kurkowski/tldextract"
license=('BSD')
depends=('python-idna' 'python-requests' 'python-requests-file' 'python-filelock')
makedepends=('git' 'python-setuptools-scm')
checkdepends=('python-pytest' 'python-pytest-mock' 'python-pytest-pylint' 'python-responses'
              'python-isort')
source=("git+https://github.com/john-kurkowski/tldextract.git#commit=$_commit")
sha512sums=('SKIP')

build() {
  cd tldextract
  python setup.py build
}

check() {
  cd tldextract
  python -m pytest --ignore build
}

package() {
  cd tldextract
  python setup.py install --root="$pkgdir" --optimize=1 --skip-build
  install -Dm644 LICENSE -t "$pkgdir"/usr/share/licenses/$pkgname/
}

# vim:set sw=2 et:
